package routes

import (
	"github.com/iris-contrib/middleware/cors"
)

//CorsHandler
var CorsHandler = cors.New(cors.Options{
	Debug:            false,
	AllowCredentials: true,
	AllowedOrigins:   []string{"*"}, // 允许通过的主机名称
	AllowedMethods: []string{
		"GET",
		"POST",
		"PUT",
		"PATCH",
		"DELETE",
		"OPTIONS",
		"HEAD",
	},
	AllowedHeaders: []string{
		"Origin",
		"Content-Type",
		"Cookie",
		"Accept",
		"Authorization",
		"Access-Control-Allow-Origin",
		"X-Requested-With",
	},
})
